<?php
class Training_Form_Captcha extends Zend_Form{
	
	public function init(){
		$this->setMethod('post')
			->setEnctype('multipart/form-data')
			->setAction('')
			->setName('appForm');
		//=================Zend_Form_Element_Captcha================ 		
		$captchaOption = array(
								'captcha'=>'Image',
								'imgDir'=>CAPTCHA_PATH . '/img',
								'imgUrl'=>CAPTCHA_URL . '/img',
								'wordlen'=>6,
								'font'=>CAPTCHA_PATH . '/font/abc.ttf',
								'fontSize'=>30,
								'width'=>240,
								'height'=>70,
								'timeout'=>100,
								);
		
		$options = array('label'=>'Security code:',
						 'captcha'=> $captchaOption );
		$captcha = new Zend_Form_Element_Captcha('security',$options);
		
		$this->addElements(array($captcha));
	}
}